[
    async function( kuo,Context,context){
        var $THIS = this;
        let $DATA = Object.assign({},this.$DATA);

        $DATA.token = kuo.sessionid;
        $DATA.code = 1;
        $DATA.data = 0;
        let ID = Mode("Tools").Int(kuo.post["id"]?kuo.post["id"]:0);
       
        Context.Cache = false;
        if(ID > 0){
            let HASH = "cms_renqi/"+ID;
            let renqi = await Mem.Get(HASH);
            if(renqi){
                renqi++;
                await Mem.Set(HASH,renqi);
                $DATA.data = renqi;
            }else{
                let dbc = await db("cms_content");
                let renqix = await dbc.Zhicha('popularity').Where({id:ID}).Find();
                if(renqix){
                    $DATA.data = renqix.popularity+1;
                    await Mem.Set(HASH,$DATA.data);
                }else{
                    $DATA.data +=1;
                    await Mem.Set(HASH,$DATA.data);
                }
            }
            if($DATA.data > 10){
                if($DATA.data%30 == 1){
                    let dbc = await db("cms_content");
                    await dbc.Where({id:ID}).Update({popularity:$DATA.data});
                }
            }
        }

        return  json_encode($DATA);
    }
]